package com.oocl.euc.core.maintenance.service;

import com.oocl.euc.core.maintenance.model.ApplicationKey;
import com.oocl.euc.core.maintenance.repository.ApplicationKeyRepository;
import com.oocl.euc.framework.base.persistence.IBaseRepository;
import com.oocl.euc.framework.base.service.BaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ApplicationKeyService extends BaseService<ApplicationKey, Long> {

    @Autowired
    private ApplicationKeyRepository applicationKeyRepository;

    @Override
    protected IBaseRepository<ApplicationKey, Long> getRepository() {
        return applicationKeyRepository;
    }

    public ApplicationKey findByAppKey(String appKeyName) {
        return applicationKeyRepository.findByAppKey(appKeyName);
    }
}
